#ifndef WINDOW4_H
#define WINDOW4_H
#include"bullet.h"
#include <QMainWindow>
#include<QList>
#include"tower.h"
#include "myobject.h"
#include <QMainWindow>
#include "tower.h"
#include  <QList>
#include "myobject2.h"
#include <QWidget>
#include <QPainter>     //画家
#include <QMouseEvent>  //鼠标事件
#include <Qtimer>       //定时器
#include "defensetowerpit.h"    //防御塔坑类
#include "selectionbox.h"       //选择框类
#include "defetowerparent.h"    //防御塔父类
#include "monster.h"    //怪物类
#include <QLabel>
#include "towerposition.h"
#include "towerbase.h"

class window4 : public QMainWindow
{
    Q_OBJECT
public:
    explicit window4(QWidget *parent = nullptr);
    void paintEvent( QPaintEvent *);
    void set_tower();
    void addMyObject();

     void addMyObject2();
     void showInfo(QPainter*painter);
    QList<bullet*>bullet_list;

    void fire();
    void updatescreen();
    void updateScene();

    void loadPos();
    void mousePressEvent(QMouseEvent *event);
    bool ifbuy() const;

private:
    int fee = 10;
    int wave = 20;
    QList<TowerPosition> towerPositionsList;
    QList<towerbase*> towersList;
    int money=1000;
    QList<Tower*>tower_list;
    QList<MyObject*>object_list;
    QList<MyObject2*>object2_list;
signals:
    void Back();

};

#endif // WINDOW4_H
